﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ShopSite.Master" AutoEventWireup="true" CodeBehind="homeWeb.aspx.cs" Inherits="ShoppingWebSite.homeWeb" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style>
        #Content{
            width:1200px;
            margin:0px auto;
        }
        .ProductDetail{
            width:380px;
            margin-left:20px;
            margin-top:20px;
            padding-bottom:20px;
        }
        .ProductDetailDiv1 img{
            width:350px;
            height:350px;
        }
        .ProductDetailDiv2 span{
            color:red;
            font-size:18px;
        }
        .btnAdd,.btnShopping{
            display:block;
            width:150px;
            height:40px;
            background-color:#ef3f3f;
            border: 1px solid red;
            border-radius:5px;
            margin-top:40px;
            color:white;
            line-height:40px;
            text-align:center;
        }
        .btnShopping{
            margin-left:30px;
        }
        .btnAdd a,.btnShopping a{
            color:white;
            text-decoration:none;
        }
    </style>
    <link rel="stylesheet" href="css/ShopSite.css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="Content">
        <asp:DataList ID="DLProduct" runat="server" RepeatColumns="3">
            <ItemTemplate>
                <div class="ProductDetail">
                    <div class="ProductDetailDiv1">
                        <img src='Images/<%#Eval("PImage") %>' />
                    </div>
                    <div class="ProductDetailDiv2">
                        <h4><%#Eval("PSName") %></h4>
                        <span>$<%#Eval("PPrice") %></span><br /><div style="display:flex;flex-direction:row;">
                            <span class="btnAdd">
                                <a href='AddSubmit.aspx?PId=<%#Eval("PId") %>'>添加至购物车</a>
                            </span>
                            <span class="btnShopping">
                                <a href='ShoppingSubmit.aspx?PId=<%#Eval("PId") %>'>直接购买商品</a>
                            </span>
                        </div>
                        
                    </div>
                </div>
            </ItemTemplate>
        </asp:DataList>
        
    </div>
</asp:Content>
